<html>
<head>
	<meta charset='utf-8' />
	<title>辩证后台管理</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<style>
		@media screen and (max-width:450px){
			#Content,.Nav_bottom,#Back_Btn{width:98%;margin:0 auto}

			/*页面宽度900以下时 .abc的宽度为450*/
		}
		@media screen and (min-width:450px){
			#Content,.Nav_bottom,#Back_Btn{width:450px;margin:0 auto}
			/*页面宽度900以下时 .abc的宽度为450*/
		}
	</style>
</head>

<script src='../public/jquery.js'></script>
<script src='../public/fun.js'></script>
<body style='padding:0;margin:0;background:#eaa'>

	<!-- 1 Content容器 -->
	<div id='Content' style=''>
		<div style='text-align:right;padding:10px;font-size:12px'>
			<span style='color:blue' onclick='_logout()'>退出</span>
		</div>
		

		<!--欢迎页-->
		<div id='Main_Content_Area'></div>	



	</div><!-- 1 Content容器结束 -->


	<!-- 等待提示框 -->
	<div id='Notice'></div>

	<!--友情链接-->

	<!--空间隔离元素-->
	<div style='margin-bottom:45px'></div>

	<!--底部导航容器-->
	<div style='position:fixed;bottom:0;width:100%'>
		<div class='Nav_bottom'>
			<select id="Main_Nav" style='width:100%'>
				<option value="main_index" selected>欢迎页</option>
				<option value="1">症状管理</option>
				<option value="2">征候管理</option>
				<option value="3">经方管理</option>
			</select>
		</div>
	</div><!--底部导航容器结束-->
</body>
</html>
<script>
$(function(){

//加载导航页面内容
function _viewPage(){
	switch(sessionStorage.sel_val){
		case 1:case '1':
			var path = 'main_type1.html';
			break;
		case 2:case '2':
		case 3:case '3':
			var path = 'main_type2.html';
			break;
		default:
			var path = 'main_type1.html';
	}
	Ajax({},function(res){
		$('#Main_Content_Area').html(res);
	},path);
}

function _navControl(){
	if(sessionStorage.sel_val == 'main_index'){
		_viewWelcome();	//加载欢迎页
	}else{
		_viewPage();//加载导航页面内容
	}
}


	//检测用户登陆状态，异常则退出到登陆页面
	var setval = setInterval(function(){
		if(!sessionStorage.user || !sessionStorage.after_token1){
			clearInterval(setval);
			A('用户已退出！');
			location.replace('login.html');
		}
	},200);


	_viewWelcome();	//加载欢迎页

	//底部导航的切换
	$('#Main_Nav').change(function(){
		var sel_val = $(this).find('option:selected').val();
		sessionStorage.sel_val = sel_val;
		_navControl();

	});


	//底部导航的状态保持
	if(sessionStorage.sel_val){
		$('#Main_Nav').val(sessionStorage.sel_val);
		_navControl();
	}

})




//加载欢迎页
function _viewWelcome(){
	$('#Main_Content_Area').html("<h1 style='text-align:center;margin-top:100px;color:red'>欢迎页</h1>");
}

function Notice2(type){
	if(type){
		Notice('处理中......');
	}else{
		setTimeout(function(){
			Notice();
		},1000)
	}
}
</script>

